import { Map } from 'immutable'
import { TESTINCREMENT } from '../actionType'

const initialState = Map({
  num: 1,
  text: 'test是一个测试组件'
})

export default (state = initialState, { type, payload }) => {
  switch (type) {
    case TESTINCREMENT:
      return state.set('num', state.get('num') + payload)
    default:
      return state
  }
}
